package com.jzhao.gper.spring.v2.webmvc.servlet;

import java.io.File;

/**
 * @author jzhao
 * @date 2020/4/9 23:48
 */
public class JZViewResolver {
    private final String DEFAULT_TEMPLATE_SUFFIX = ".html";
    private File viewFile;

    public JZViewResolver(File viewFile) {
        this.viewFile = viewFile;
    }

    public JZView resolveViewName(String viewName){
        if(viewFile.getName().equals(viewName)){
            return new JZView(viewFile);
        }
        return null;
    }
}
